<ui:composition 
        xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:p="http://primefaces.org/ui"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:c="http://java.sun.com/jsp/jstl/core">
 

    <th>
        <c:if test="${loginBean.exists}">
            
            <h:outputText value="Vous etes connecté"/>
            <a href="Profil.xhtml">
            <h:outputText value=" #{loginBean.authenticatedUserName}"/></a>
            <h:commandButton value="Se deconnecter" actionListener="#{loginBean.deconnection}"/>
            
        </c:if>                
    </th>  

    <th >
        <div style="text-align: right;">
            <c:if test="${loginBean.exists == false}">  
                <h:form>

                    <h:outputLabel value="Identifiant : "/><!--label-->
                    <p:inputText required="true" id="memberid" value="#{loginBean.username}"/>
                    <br/>
                    <h:outputLabel value="Mot de passe : "/>
                    <p:inputText required="true" id="pwdid" value="#{loginBean.password}"/>
                    <br/>
                    <h:commandButton id="loginButton" value="Login" actionListener="#{loginBean.authenticate}"/>  

                </h:form>
                <a href="Inscription.xhtml">Inscription</a>
            </c:if>
        </div>
    </th> 

</ui:composition>